import { createRouter, createWebHistory } from "vue-router";
import HomeView from "@/views/index/index.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "home",
            component: HomeView,
        },
        // {
        //     path: "/about",
        //     name: "about",
        //     // route level code-splitting
        //     // this generates a separate chunk (About.[hash].js) for this route
        //     // which is lazy-loaded when the route is visited.
        //     component: () => import("../views/AboutView.vue"),
        // },
    ],
});

export default router;

// // import type { App } from 'vue'
// // import type { RouteRecordRaw } from 'vue-router'
// import { createRouter, createWebHashHistory } from "vue-router";
// import remainingRouter from "./modules/remaining";

// // 创建路由实例
// const router = createRouter({
//     history: createWebHashHistory(), // createWebHashHistory URL带#，createWebHistory URL不带#
//     strict: true,
//     routes: remainingRouter,
//     scrollBehavior: () => ({ left: 0, top: 0 }),
// });

// // 导出路由实例
// export const setupRouter = (app) => {
//     app.use(router);
// };
// export default router;
